function assert(condition, msg) {
  if (!condition) {
    throw new Error(msg)
  }
}

function cloneDeep(obj) {
  if (
    !obj ||
    typeof obj == 'number' ||
    typeof obj == 'string' ||
    typeof obj == 'boolean' ||
    typeof obj == 'function'
  ) {
    return obj
  } else if (Array.isArray(obj)) {
    const array = []
    for (let i = 0; i < obj.length; i++) {
      array.push(cloneDeep(array[i]))
    }
  } else if (typeof obj == 'object') {
    const newObj = Object.create(null)
    Object.keys(obj).forEach(key => {
      newObj[key]
    })
  }
}
